﻿using SQLBuilder.Core.Repositories;
using System.IO;

namespace FolderTag.DB
{
    public static class DBHelper
    {
        public static SqliteRepository SQL_R = new SqliteRepository("Data Source=foldertags.db");

        public static void Close()
        {
            try
            {
                SQL_R.Connection.Close();
                SQL_R.Dispose();
            }
            catch { }
        }

        public static void BackDb()
        {
            try
            {
                string dppath = "foldertags.db";
                File.Copy(dppath, $"{dppath}.bak", true);
            }
            catch { }
        }
    }
}
